package com.laoxu.test.rbacdemo.dao;

import com.laoxu.test.rbacdemo.model.SysMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author laoxu
 * @since 2020-08-09
 */
public interface SysMenuMapper extends BaseMapper<SysMenu> {
    List<SysMenu> findUserPermissions(String userName);

    List<SysMenu> findUserMenus(String userName);

    /**
     * 查找当前菜单/按钮关联的用户 ID
     *
     * @param menuId menuId
     * @return 用户 ID集合
     */
    List<String> findUserIdsByMenuId(String menuId);
}
